package com.cheejee.goodscenter.service;

import java.util.List;

import javax.validation.constraints.NotNull;

import org.springframework.validation.annotation.Validated;

import com.cheejee.goodscenter.module.entity.GoodsBrandProperties;
import com.github.pagehelper.Page;

/**
 * @author CARRY
 * @Date 2020年10月28日上午12:00:26
 */
@Validated
public interface GoodsBrandPropertiesService {

	/**
	 * 按id查询商品品牌属性
	 *
	 * @param id
	 * @return
	 */
	GoodsBrandProperties queryById(@NotNull(message = "商品品牌属性ID不能为空") Long id);

	/**
	 * 按条件查询商品品牌属性
	 *
	 * @param goodsId 商品id
	 * @param brandPropertiesTemplateId 属性模板id
	 * @param propertiesName 属性名称
	 * @return
	 */
	Page<GoodsBrandProperties> queryGoodsBrandProperties(Long goodsId, Integer brandPropertiesTemplateId, String propertiesNamem, int pageNum, int pageSize);


	int addGoodsBrandProperties(GoodsBrandProperties properties);
	
	int addGoodsBrandProperties(List<GoodsBrandProperties> properties);
	

	/**
	 * 修改属性值
	 *
	 * @param properties
	 * @return
	 */
	int changeGoodsBrandPropertiesValue(@NotNull(message = "商品品牌属性ID不能为空")Long propertiesId, @NotNull(message = "商品品牌属性值不能为空")String propertiesValue);

	int deleteGoodsBrandProperties(@NotNull(message = "商品品牌属性ID不能为空")Long... id);

}
